package cn.cdliux.spring.beans.factory;

import cn.cdliux.spring.beans.BeansException;

/**
 * Bean 工厂
 * @author liuxiang
 */
public interface BeanFactory {

    /**
     * 通过名称获取 bean
     *
     * @param name
     * @return
     * @throws BeansException
     */
    Object getBean(String name) throws BeansException;


    /**
     * 通过名称及构造函数获取 bean
     *
     * @param name
     * @param args
     * @return
     * @throws BeansException
     */
    Object getBean(String name, Object... args) throws BeansException;

    <T> T getBean(String name, Class<T> requiredType) throws BeansException;

}
